package com.qf.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qf.entity.Role;
import com.qf.mapper.RoleMapper;
import com.qf.result.ResponseResult;
import com.qf.service.RoleService;
import com.qf.utils.BeanCopyUtils;
import com.qf.vo.RoleVo;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 角色信息表(Role)表服务实现类
 *
 * @author makejava
 * @since 2023-02-05 12:40:45
 */
@Service("roleService")
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements RoleService {

    @Override
    public ResponseResult getRoleList() {
        List<Role> roles = list();
        List<RoleVo> roleVos = BeanCopyUtils.copyBeanList(roles, RoleVo.class);
        return ResponseResult.okResult(roleVos);

    }
}
